import axios from 'axios'

const service = axios.create({
  baseURL: process.env.UPLOAD_SERVICE_BASE_URL, // url = base url + request url    // withCredentials: true, // send cookies when cross-domain requests
  timeout: 600000 // request timeout
})

export function status (params) {
  return service({
    url: '/upload/status',
    method: 'get',
    params
  })
}

export function upload (data) {
  return service({
    url: '/upload',
    method: 'post',
    data
  })
}
